import os, sys, unittest, bs4

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import hexorender

class HexoRenderTest(unittest.TestCase):

    def test_convert_pre(self):
        render = hexorender.HexoRender('.', '.')
        fd = open(os.path.join(os.path.dirname(__file__), "test.html"))
        try:
            soup = bs4.BeautifulSoup(fd, 'lxml')
            render._convert_pre(soup)
            print(soup.prettify())
        finally:
            fd.close()

if __name__ == "__main__":
    unittest.main()
